home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 380 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.8 KB

  1. Path: cs.mu.OZ.AU!bounce-back
  2. From: fjh@munta.cs.mu.OZ.AU (Fergus Henderson)
  3. Newsgroups: comp.std.c++
  4. Subject: Re: typedef not strong
  5. Date: 20 Feb 96 04:56:37 GMT
  6. Organization: Comp Sci, University of Melbourne
  7. Approved: fjh@cs.mu.oz.au
  8. Message-ID: <4g8vdo$igt@mulga.cs.mu.OZ.AU>
  9. References: <4g5sm4$dtt@natasha.rmii.com>
  10. NNTP-Posting-Host: munta.cs.mu.oz.au
  11. X-Original-Date: 19 Feb 1996 04:47:52 GMT
  12. X-Auth: PGPMoose V1.1 PGP comp.std.c++
  13.     iQBFAgUBMSlUlOEDnX0m9pzZAQE3SgF/b+SbjU//HGCAaqenJTb9heudruKoIjOr
  14.     lHZu9zQFpcB5SUivDYk6uN+xX5B2gbQz
  15.     =lcsr
  16. Originator: fjh@munta.cs.mu.OZ.AU
  17.  
  18. rpayne@rainbow.rmii.com (Robert Payne) writes:
  19.  
  20. >Why has C++ stayed with the weak typedef?  It has always seemed to
  21. >me that it should provide a new type and not just a synomym.  Some
  22. >lints check for strong typing but I haven't found a compiler that 
  23. >will enforce it.  I know this must have been debated at some point
  24. >but I didn't find it in a FAQ.  Could someone please enlighten me?
  25.  
  26. If typedef were to create a new type, what operations would be allowed
  27. on the new type?
  28.  
  29. I think that changing the meaning of `typedef' would be a bad idea.
  30. It might make sense to propose a new construct, say `newtypedef', that
  31. did something different, but C++ already has a way to create new types
  32. (`class'), and it is not at all clear that adding a new way would be
  33. worth the additional complexity.
  34.  
  35. --
  36. Fergus Henderson                 WWW: http://www.cs.mu.oz.au/~fjh
  37. fjh@cs.mu.oz.au                  PGP: finger fjh@128.250.37.3
  38. ---
  39. [ To submit articles: try just posting with your news-reader.
  40.                       If that fails, use mailto:std-c++@ncar.ucar.edu
  41.   FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html
  42.   Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html
  43.   Comments? mailto:std-c++-request@ncar.ucar.edu.
  44. ]
  45.